import request from "@/utils/request"

export enum EvcsStatus {
  启用 = 1,
  禁用 = 2,
  未设置 = 3,
}
export interface QueryEvcsListParams extends PaginationParams {
  stationId?: string
}
export interface QueryStationListParams extends PaginationParams {
  platOrgId: string
}

export interface Evcs {
  id: string
  orgId: string
  orgName: string
  feeModify: number
}

export async function queryList(params: QueryEvcsListParams) {
  return request<Evcs[]>('/app/manager/evcs/list', {
    data: params,
  })
}

export async function queryList2(params: QueryEvcsListParams) {
  return request<any[]>('/app/manager/station/evcsL', {
    data: params,
  })
}

export async function setRate(params: {platOrgId: string, feeModify: number}) {
  return request('/app/manager/evcs/setFee', {
    data: params,
  })
}

export async function queryStationListById(params: QueryStationListParams) {
  return request<Evcs[]>('/app/manager/evcs/station/list', {
    data: params,
  })
}

export async function saveEvcs(params: {stationId: string, evcsOrgIds: string}) {
  return request<boolean>('/app/manager/evcs/oneStation', {
    data: params,
  })
}
